package com.jkhan.common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName ResponseEnum
 * @Description
 * @Author hjk
 * @date 2023/3/4 16:40
 * @Version 1.0
 */
@Getter
@AllArgsConstructor
public enum ResponseEnum {

    /**
     * 按照http标准状态码，可扩展
     */
    SUCCESS(200, "操作成功"),
    CREATED(201, "创建成功"),
    DELETED(204, "删除成功"),
    FAILURE(400, "操作失败"),
    UNAUTHORIZED(401, "未认证"),
    FORBIDDEN(403, "权限不足"),
    NOT_FOUND(404, "资源不存在"),
    ERROR(500, "服务器发生错误"),
    SERVICE_UNAVAILABLE(503, "服务器忙")
    ;

    private Integer code;
    private String msg;

}
